cb2178d8fbbf40b15668fae49e0930d66a37eb0f,clc/modules/msgs/src/main/java/com/eucalyptus/component/ServiceTransitions.java,ServiceTransitions,startTransitionChain,#ServiceConfiguration#,111
Before Change
static final CheckedListenableFuture<ServiceConfiguration> startTransitionChain( final ServiceConfiguration config ) {
if ( !State.NOTREADY.equals( config.lookupState( ) ) && !State.DISABLED.equals( config.lookupState( ) ) ) {
try {
Callable<CheckedListenableFuture<ServiceConfiguration>> transition = Automata.sequenceTransitions( config, Component.State.INITIALIZED,
Component.State.LOADED,
Component.State.NOTREADY, Component.State.DISABLED );
Future<CheckedListenableFuture<ServiceConfiguration>> result = Threads.lookup( Empyrean.class, ServiceTransitions.class, config.getFullName( ).toString( ) ).submit( transition );
return result.get( );
} catch ( InterruptedException ex ) {
LOG.error( ex, ex );
Thread.currentThread( ).interrupt( );
return Futures.predestinedFailedFuture( ex );
} catch ( ExecutionException ex ) {
LOG.error( ex.getCause( ), ex.getCause( ) );
return Futures.predestinedFailedFuture( ex.getCause( ) );
}
} else {
return Futures.predestinedFuture( config );
After Change
Component.State.LOADED,
Component.State.NOTREADY, Component.State.DISABLED );
Future<CheckedListenableFuture<ServiceConfiguration>> result = Threads.lookup( Empyrean.class, ServiceTransitions.class, config.getFullName( ).toString( ) ).submit( transition );
try {
return result.get( );
} catch ( InterruptedException ex ) {
LOG.error( ex, ex );
throw new UndeclaredThrowableException( ex );
} catch ( ExecutionException ex ) {
LOG.error( ex, ex );
throw new UndeclaredThrowableException( ex.getCause( ) );
}
} else {
return Futures.predestinedFuture( config );